#ifndef __BASE_EMITTER_HPP__
#define __BASE_EMITTER_HPP__

#include "Particle.hpp"
#include <vector>
#include <string>

#define DEFAULT_SPAWN_LIMIT  3000
#define DEFAULT_SPAWN_FREQ   60

class BaseEmitter
{
public:
	BaseEmitter();
	BaseEmitter(std::string fileName, unsigned int limit, int freq);
	~BaseEmitter();

	void   SetSpawnLimit(unsigned int limit);
	void   SetSpawnFreq(int freq);
	void   SetParticleImage(std::string fileName);
	void   Update(clock_t tick);
	void   Render();
	bool   isDepleted();

private:
	void SpawnParticle();

	std::vector<Particle*>  m_particles;
	std::string             m_particImage;
	unsigned int            m_spawnLimit;
	int                     m_spawnFreq;
};

#endif // __BASE_EMITTER_HPP__